<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title>人力资源管理系统登录</title>

<link href="/HrManage/static/css/bootstrap.min.css" title="" rel="stylesheet" />
<link title="orange" href="/HrManage/static/css/login.css" rel="stylesheet" type="text/css">
</head>
<body>
<div style="height:1px;"></div>
<div class="login">
 <header>
	<h1>登陆</h1>
 </header>
 <div class="sr" >
	<form action="staff/login">
		<div class="name">
			<label>
			<i class="sublist-icon glyphicon glyphicon-user"></i>
			</label>
			<input type="text" name="staffNum"  placeholder="这里输入登录名" class="name_inp">
		</div>
		 <div class="name">
			<label>
			<i class="sublist-icon glyphicon glyphicon-pencil"></i>
			</label>
			<input type="password" name="password"  placeholder="这里输入登录密码" class="name_inp" >
		</div>
		<button class="dl">登陆</button>
	</form>
 </div>
</div>
<div style="text-align:center;margin:-150px 0; font:normal 14px/24px 'MicroSoft YaHei';color:#ffffff">
</div>

<%  
  if (request.getParameter("staffNum") != null   
          && request.getParameter("password") != null) {    
      String Name = request.getParameter("staffNum");  
      String Password = request.getParameter("password");  
      if (Name.equals("a") && Password.equals("a")) {     
          session.setAttribute("Login", "OK");  
          session.setAttribute("myCount", new Integer(1));  
          response.sendRedirect("welcome.jsp");  
      }  
      else {     
          %>  
          登录失败:用户名或密码不正确～  
          <%    
      }   
  }  
%>  
</body>
</html>
